#ifndef MYWIDGET_H
#define MYWIDGET_H

#include <QWidget>
#include <QPushButton>
#include <QLabel>
#include <QDebug>
#include <QMovie>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QCheckBox>
#include <QSlider>
#include <QDoubleSpinBox>
#include <QFileDialog>


namespace Ui {
class myWidget;
}

class myWidget : public QWidget
{
    Q_OBJECT

public:
    explicit myWidget(QWidget *parent = 0);
    ~myWidget();
    void create_MovieControls();
    void create_MovieBtns();
    void btn_setrun();
    void btn_setpause();


private slots:
    void openfile_btn_clicked();
    void speedbox_value_changed();
    void playpause_btn_clicked();
    void updateframe();
    void gif_fitwindow();
    void gotoFrame(int frame);


private:
    Ui::myWidget *ui;
    QMovie *movie;
    QLabel *movie_label;
    bool isRun;

    //Layout
    QVBoxLayout *main_layout;
    QHBoxLayout *moviebtns_layout;
    QHBoxLayout *moviecontrols_layout;

    //MovieBtns
    QPushButton *Openfile_btn;
    QPushButton *Stop_btn;
    QPushButton *PlayPause_btn;
    QCheckBox *Fitwindow_box;
    QLabel *Speed_label;
    QDoubleSpinBox *Speed_box;
    QIcon btn_icon2;

    //MovieControls
    QLabel *Progress_label;
    QSlider *Progress_slider;


};

#endif // MYWIDGET_H
